]> dgit.raspbian.org Git - dovecot.git/commit
[PATCH 2/2] login-common: Avoid array_front() panic on empty forward_fields array
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Sun, 3 May 2026 16:24:38 +0000 (16:24 +0000)
committerNoah Meyerhans <noahm@debian.org>
Wed, 16 Sep 2026 19:06:35 +0000 (15:06 -0400)
commit814082258e6e99af81884d2df22ff08520d7a720
treefa03afda0b98aed6088b6cb6d5866e3b81b858b8
parent5e83291d6e3f6a2a8b7942fddcfe36ab1f1a9878
[PATCH 2/2] login-common: Avoid array_front() panic on empty forward_fields array

sasl_server_auth_request_info_fill() and proxy_redirect_reauth()
NUL-terminate the forward_fields array via array_append_zero() +
array_pop_back() and then call array_front() to hand the C array to
the auth client. array_front() asserts when the array is empty, so a
created-but-empty forward_fields array crashes login.

The empty-array case is no longer reachable from
client_forward_decode_base64() after the previous commit, but guard
defensively here as well: any future caller that creates the array
without populating it should not be able to panic the process.

Gbp-Pq: Name 0002-login-common-Avoid-array_front-panic-on-empty-forwar.patch
src/login-common/client-common-auth.c
src/login-common/sasl-server.c